#region OpenNETCF Copyright Information
/*
Copyright (c) 2007 OpenNETCF Consulting, LLC

Permission is hereby granted, free of charge, to any person obtaining a copy of this software 
and associated documentation files (the "Software"), to deal in the Software without restriction,
including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, 
and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, 
subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial 
portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, 
INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR 
PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE 
FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
#endregion

using System;
using System.Runtime.InteropServices;
using System.Collections.Generic;
using System.Text;

namespace OpenNETCF.WindowsMobile.Ink.Interfaces
{
    [Guid("9794FF82-6071-4717-8A8B-6AC7C64A686E")]
    [InterfaceType(ComInterfaceType.InterfaceIsDual)]
    [ComImport]
    public interface IInkRectangle
    {
        //Represents access to a rectangle for Automation users.  
        int Top { get;set;}
        //Returns or sets the left position of the InkRectangle object
        int Left { get;set; }
        //Returns or sets the bottom position of the InkRectangle object
        int Bottom { get;set;}
        //Returns or sets the right position of the InkRectangle object  
        int Right { get;set;}
        //Returns or sets access to the rectangle struct  
        _RECT Data { get; set; }
        //Specifies (returns) the elements of the InkRectangle object in a single call  
        void GetRectangle(
                        out int Top,
                        out int Left,
                        out int Bottom,
                        out int Right);
        //Specifies (sets) the elements of the InkRectangle object in a single call  
        void SetRectangle(
                        int Top,
                        int Left,
                        int Bottom,
                        int Right);
    }

    public struct _RECT
    {
        public int t;
        public int l;
        public int b;
        public int r;
    }

    public static class InkRectangle
    {
        public static IInkRectangle CreateInstance()
        {
            Type t = Type.GetTypeFromCLSID(new Guid("43B07326-AAE0-4B62-A83D-5FD768B7353C"));
            return (IInkRectangle)Activator.CreateInstance(t);
        }
    }
}
